-- GENERATED SPELL FOR [Forest Spider] --


function spell0_30(pUnit, Event) --@Bite,n/a--
pUnit:FullCastSpellOnTarget(17253,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30', 651, 1)
end

function spell1_30(pUnit, Event) --@Bite,n/a--
pUnit:FullCastSpellOnTarget(17255,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30', 595, 1)
end

function spell2_30(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30', 0, 1)
end

function spell3_30(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(2649,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30', 0, 1)
end

function spell4_30(pUnit, Event) --@Web,n/a--
pUnit:FullCastSpellOnTarget(4167,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30', 4000, 1)
end

function Sorts_30(pUnit, Event)
local choix_sorts_30 = math.random(0, 4)
if choix_sorts_30 == 0 then
pUnit:RegisterEvent('spell0_30', 1, 1)
end
if choix_sorts_30 == 1 then
pUnit:RegisterEvent('spell1_30', 1, 1)
end
if choix_sorts_30 == 2 then
pUnit:RegisterEvent('spell2_30', 1, 1)
end
if choix_sorts_30 == 3 then
pUnit:RegisterEvent('spell3_30', 1, 1)
end
if choix_sorts_30 == 4 then
pUnit:RegisterEvent('spell4_30', 1, 1)
end
end

function mob30_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30', math.random(1500, 3000), 1)
end

function mob30_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30, 1, 'mob30_Action')
RegisterUnitEvent(30, 2, 'mob30_Leave')
RegisterUnitEvent(30, 3, 'mob30_Kill')
RegisterUnitEvent(30, 4, 'mob30_Die')
